package com.ylr.Scheduled;

import cn.hutool.json.JSONObject;
import com.fasterxml.jackson.annotation.JsonView;
import com.ylr.bean.Mymap;
import com.ylr.demo2.JsonView.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @ClassName ScheduledController
 * @Description TODO
 * @Author 11
 * @Date 2021/8/1 1:05
 * @Version 1.0
 */
//@RestController

public class ScheduledController {
    @Autowired
    ScheduleTask scheduleTask;
    @GetMapping("/count")
    public Object getcount() {
        return new JSONObject(new Mymap().getMap());
//        return jsonObject;
//        Iterator<Map.Entry<String, String>> iterator = scheduleTask.hashMap.entrySet().iterator();
//        while (iterator.hasNext()){
//            Map.Entry<String, String> entry = iterator.next();
//            String key = entry.getKey();
//            String value = entry.getValue();
//        }

//        return scheduleTask.count.toString();
    }

}
